<?php

$site = elgg_get_site_entity();

echo "<h1 id=\"facebook-header-logo\">";
echo elgg_view('output/url', array(
	'href' => '/',
	'text' => $site->name,
));
echo "</h1>";
?>
<ul class="services">
                	<li><a href="<?php $_SERVER['SERVER_NAME']?>/news/">News</a></li>
                    <li><a href="<?php $_SERVER['SERVER_NAME']?>/shop/">Shop</a></li>
</ul>

<?php
echo "<div class='login-block'>";
 if(elgg_is_active_plugin("cas_auth")){
	$config = elgg_get_plugin_from_id("cas_auth");
	$url = elgg_add_action_tokens_to_url(elgg_get_site_url()."action/login");
	echo "<a href='https://".$config->cashostname.":".$config->casport.$config->casbaseuri."/login?service=".$url."' class='btnLogin btn'>Login</a><a href='#' class='btnRegister btn'>Register</a>";
}else{  
	echo elgg_view_form('login', array('id' => 'facebook-header-login'));
?>
	<style type="text/css">
		.services{
			position: absolute;
			top: 1px;right:382px;
			z-index:3;
		}
	</style>
<?php } 
echo "</div>";
?>